{include file="overall_header.tpl"}
{if $ismessage == true || $validator == true}
<script>
    {literal}
    function hide()
    {
        var item;
        
        if (document.getElementById)
        {
            item = document.getElementById('infobar');
        }
        else if (document.all)
        {
            item = document.all['infobar'];
        }
        else if (document.layers)
        {
            item = document.layers['infobar'];
        }
        
        if (item && item.style)
        {
            item.style.display = "none";
        }  
        return;
    }
    {/literal}
</script>
{if $ismessage == true}
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100%"> 
<div {if $usererror != true}id="infobar"{else}id="errorbar"{/if} title="Click to hide"><a href="#" onclick="hide();">{$infomessage}</a></div>
</td> </tr> </table>
{/if}
{elseif $newpm}
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100%"> 
<div id="infobar"><a href="index.php?page=pmmain">You have a new private message, click here to read it now</a></div>
</td> </tr> </table>
{elseif $nummessagepm > 0}
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100%"> 
<div id="infobar"><a href="index.php?page=pmmain">You have {$nummessagepm} unread private messages, click here to read them now</a></div>
</td> </tr> </table>
{/if}
<!--Start with the main file-->
<table id="ta" cellpadding="0" width="100%" border="0" cellspacing="0" summary="Main Table">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" summary="Content Table">
<tr>
{if $extra != "nomenu"}
        <td class="logo"valign="top">
            {if $config.adcode != ""}{$config.adcode}<br />{/if}
            <div align="left">
                <img src="{$templateinfo.imagedir}logo.gif" alt="Logo"/>
            </div>
        </td>
        <td colspan="2" class="logo" valign="middle">
            <div align="right" style="font-size:24pt">{$config.troopname}</div>
        </td>
    </tr>
    <tr>
        <td id="personinfo" align="center">
           <div style="text-align:center">{eval var=$userdisp}</div>
        </td>
{if $menu.top != ""}
    <td id="topmenu" colspan="2" align="right">
        {section name=cats loop=$nummenucats.top}
         <div align="right" class="text">
          {section name=itemloop loop=$menu.top[cats].numitems}
           {if $menu.top[cats].items[itemloop].type == 1}
                <span class="navitem"><a href="index.php?page={$menu.top[cats].items[itemloop].link}" class="top" target="{$menu.top[cats].items[itemloop].target}">{$menu.top[cats].items[itemloop].name}</a></span>
           {elseif $menu.top[cats].items[itemloop].type == 2 || $menu.top[cats].items[itemloop].type == 3}
                <span class="navitem"><a href="{$menu.top[cats].items[itemloop].link}" class="top" target="{$menu.top[cats].items[itemloop].target}">{$menu.top[cats].items[itemloop].name}</a></span> 
           {elseif $menu.top[cats].items[itemloop].type == 4}
                {eval var=$menu.top[cats].items[itemloop].link}
           {/if}
          {/section}
         </div>
        {/section}
    </td>
{/if}
    </tr>
    <tr>
    {if $menu.left != ""}
        <td id="leftmenu" style="width:10em" valign="top">
            {section name=cats loop=$nummenucats.left}
             {if $menu.left[cats].showhead}<div style="text-align:center">
                <span class="navhead">{$menu.left[cats].name}</span>
             </div>
             {/if}
             <div style="text-align:left" class="text">
              {section name=itemloop loop=$menu.left[cats].numitems}
               {if $menu.left[cats].items[itemloop].type == 1}
                    <span class="navitem"><a href="index.php?page={$menu.left[cats].items[itemloop].link}&amp;menuid={$menu.left[cats].items[itemloop].id}" class="navlink" target="{$menu.left[cats].items[itemloop].target}">{$menu.left[cats].items[itemloop].name}</a></span><br />
               {elseif $menu.left[cats].items[itemloop].type == 2 || $menu.left[cats].items[itemloop].type == 3}
                    <span class="navitem"><a href="{$menu.left[cats].items[itemloop].link}" class="navlink" target="{$menu.left[cats].items[itemloop].target}">{$menu.left[cats].items[itemloop].name}</a></span><br />
               {elseif $menu.left[cats].items[itemloop].type == 4}
                    {eval var=$menu.left[cats].items[itemloop].link}<br />
               {/if}
               {if $menu.left[cats].items[itemloop].subitems != 0}
                   {section name=subitemloop loop=$menu.left[cats].items[itemloop].subitems}
                       {if $menu.left[cats].items[itemloop].subitem[subitemloop].type == 1}
                            <span class="subnavitem">&nbsp;&nbsp;<a href="index.php?page={$menu.left[cats].items[itemloop].subitem[subitemloop].link}&amp;menuid={$menu.left[cats].items[itemloop].subitem[subitemloop].parent}" class="subnavlink" target="{$menu.left[cats].items[itemloop].subitem[subitemloop].target}">{$menu.left[cats].items[itemloop].subitem[subitemloop].name}</a></span><br />
                       {elseif $menu.left[cats].items[itemloop].subitem[subitemloop].type == 2 || $menu.left[cats].items[itemloop].subitem[subitemloop].type == 3}
                            <span class="subnavitem"><a href="{$menu.left[cats].items[itemloop].subitem[subitemloop].link}" class="subnavlink" target="{$menu.left[cats].items[itemloop].subitem[subitemloop].target}">{$menu.left[cats].items[itemloop].subitem[subitemloop].name}</a></span><br />
                       {/if}
                   {/section}
               {/if}
              {/section}
             </div>
            {/section}
        </td>
    {/if}
{/if}
<td id="content" valign="top">
		{if $editable == true}<div style="text-align:right;"><a href="{$editlink}"><img border="0" src="{$templateinfo.imagedir}edit.gif" alt="Edit this item" /></a></div>{/if}		
        {if $addable == true}<div style="text-align:right;"><a href="{$addlink}"><img border="0" src="{$templateinfo.imagedir}add.png" alt="Add a new item" /></a></div>{/if}

        {if $dataC == false}
			{include file="$content"}
		{else}
			{eval var=$content}
		{/if}
    {if $extra == "nomenu"}
     <a href="javascript:close()">Close Window</a>
    {/if}
        {if $rssid != ""}
    <div style="text-align:right;">
		<a href="index.php?page=rss&amp;action=feed&amp;uid={$rssid}"><img border="0" src="{$templateinfo.imagedir}rss.png" alt="Site Syndication (RSS Feed)" title="Site Syndication (RSS Feed)" /></a>		
    </div>
    {/if}
</td> {if $extra != "nomenu"}
    {if $menu.right != ""}
        <td id="rightmenu" style="width:10em" valign="top">
            {section name=cats loop=$nummenucats.right}
             {if $menu.right[cats].showhead}<div style="text-align:center">
                <span class="navhead">{$menu.right[cats].name}</span>
             </div>
             {/if}
             <div style="text-align:right" class="text">
              {section name=itemloop loop=$menu.right[cats].numitems}
               {if $menu.right[cats].items[itemloop].type == 1}
                    <span class="navitem"><a href="index.php?page={$menu.right[cats].items[itemloop].link}&amp;menuid={$menu.right[cats].items[itemloop].id}" class="navlink" target="{$menu.right[cats].items[itemloop].target}">{$menu.right[cats].items[itemloop].name}</a></span><br />
               {elseif $menu.right[cats].items[itemloop].type == 2 || $menu.right[cats].items[itemloop].type == 3}
                    <span class="navitem"><a href="{$menu.right[cats].items[itemloop].link}" class="navlink" target="{$menu.right[cats].items[itemloop].target}">{$menu.right[cats].items[itemloop].name}</a></span><br />
               {elseif $menu.right[cats].items[itemloop].type == 4}
                    {eval var=$menu.right[cats].items[itemloop].link}<br />
               {/if}
               {if $menu.right[cats].items[itemloop].subitems != 0}
                   {section name=subitemloop loop=$menu.right[cats].items[itemloop].subitems}
                       {if $menu.right[cats].items[itemloop].subitem[subitemloop].type == 1}
                            <span class="subnavitem">&nbsp;&nbsp;<a href="index.php?page={$menu.right[cats].items[itemloop].subitem[subitemloop].link}&amp;menuid={$menu.right[cats].items[itemloop].subitem[subitemloop].parent}" class="subnavlink" target="{$menu.right[cats].items[itemloop].subitem[subitemloop].target}">{$menu.right[cats].items[itemloop].subitem[subitemloop].name}</a></span><br />
                       {elseif $menu.right[cats].items[itemloop].subitem[subitemloop].type == 2 || $menu.right[cats].items[itemloop].subitem[subitemloop].type == 3}
                            <span class="subnavitem"><a href="{$menu.right[cats].items[itemloop].subitem[subitemloop].link}" class="subnavlink" target="{$menu.right[cats].items[itemloop].subitem[subitemloop].target}">{$menu.right[cats].items[itemloop].subitem[subitemloop].name}</a></span><br />
                       {/if}
                   {/section}
               {/if}
              {/section}
             </div>
            {/section}
        </td>
    {/if}
</tr>
<tr>
<td id="end" colspan="3" align="center">
 <a href="javascript:popuphelp('{$pagename}')" class="navlink">Help Me</a>
 {if ($adminpanel == "Y") && ($uname != "Guest")}<br /><br /><a href="admin.php" class="navlink">Goto Administration Panel</a>{/if}
</td>{/if}
</tr>
</table>
</td></tr>
{include file="overall_footer.tpl"}
